<script setup>
import { Toast } from 'vant';
defineProps({
    control: Object,
    model: Object,
})

const onChange = (value) => Toast('当前值：' + value);
</script>

<template>
    <van-field :name="control.id" :label="control.props.label">
        <template #input>
            <van-slider
                @change="onChange"
                v-model="model[control.id]"
                :min="control.props.min"
                :max="control.props.max"
                :step="control.props.step"
            />
        </template>
    </van-field>
</template>
